home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6741 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.6 KB  |  54 lines

  1. Path: sun001.spd.dsccc.com!spd!jmccarty
  2. From: jmccarty@spd.dsccc.com (Mike McCarty)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Finding a prime number
  5. Date: 14 Feb 1996 19:50:53 GMT
  6. Organization: DSC Communications Corporation, Plano, Texas USA
  7. Message-ID: <4fteet$b7e@sun001.spd.dsccc.com>
  8. References: <4fnnfuINNib7@keats.ugrad.cs.ubc.ca> <4fp2kt$pks@oban.cc.ic.ac.uk> <4fr62vINNcvu@keats.ugrad.cs.ubc.ca> <DMqqu9.1I1@cwi.nl>
  9. NNTP-Posting-Host: aplo139.spd.dsccc.com
  10.  
  11. In article <DMqqu9.1I1@cwi.nl>, Dik T. Winter <dik@cwi.nl> wrote:
  12. )In article <4fr62vINNcvu@keats.ugrad.cs.ubc.ca> c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) writes:
  13. ) > Public key encryption requires large prime numbers. The current algorithms for
  14.  
  15. Public key encryption does -not- require large primes. What it requires
  16. is a "trap door" function. Other means for developing trap door
  17. functions than the RSA algorithm exist.
  18.  
  19. ) > finding large prime numbers involve the generation of *random* large numbers
  20. ) > (like 100 digits, say) which are subject to *probabilistic* tests for
  21. ) > primeness. The argument is that if the random number can pass all these tests,
  22. ) > chances are very very small that it is not prime: chances as small as 1 in
  23. ) > 10^60 or something like that.  
  24. ) > 
  25. ) > If you found a deterministic way to efficiently find large primes, you'd win
  26. ) > some fame in the number theory world.
  27. )
  28. )There is no reason at all to use probable primes.  Primality proving is not
  29. )so very time consuming.  For instance to *prove* that
  30. ) 1000000000000000000000000000000000000000000000000000000000000000000000\
  31. ) 000000000000000000000000000289
  32. )is prime takes 14 seconds on a 100 MHz SGI R4k Indigo.  And that is about
  33. )the expected time for 100-digit numbers.  BTW, this is the smallest prime
  34. )100-digit number.  It took me just now much less than one minute to find it.
  35. )Note that you need the time consuming part only for those numbers that pass
  36. )the probabilistic tests.
  37. )-- 
  38. )dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924098
  39. )home: bovenover 215, 1025 jn  amsterdam, nederland; http://www.cwi.nl/~dik/
  40.  
  41.  
  42. Indeed, primality proving is not too difficult. Just as large prime
  43. computation is not difficult. I computed the largest prime known to man
  44. on a 10 MHz XT computer in 1992. It took a little over 10 days. Using
  45. the machines I have today, I can rerun it in about 4 hours. Really a
  46. pretty trivial thing to do. But to -find- the largest known prime, that
  47. is a real job. Just finding a large prime is not a big chore.
  48.  
  49. Mike
  50. ----
  51. char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
  52.  
  53. I don't speak for DSC.         <- They make me say that.
  54.